#include "app_running.h"

void SignalHandle(int sig){
    App_Device_SetIsrunning(false);
}

void App_Running_Run(void)
{
    //注册信号
    signal(SIGINT,SignalHandle);
    signal(SIGTERM,SignalHandle);
    app_device_t *dev = App_Device_Init();

    while (App_Device_GetIsRunning())
    {
        log_info("设备运行中....");
        sleep(2);
    }
    App_Device_Deinit(dev);
}
